package com.mdoya.utils;

/**
 * @author mdoya
 * @version 1.0
 * @description: 本地线程存储当前操作线程数据有效，从filter开始到程序结束，  注意：内存泄露问题
 */
public class ThreadLocalContextUtils {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setUserLongId(Long id){
        threadLocal.set(id);
    }
    public static Long getUserLongId(){
        return threadLocal.get();
    }
}
